<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./reactive-01-实现基本的依赖收集.js"></script>
</head>

<body>
  <div id="app">aaa</div>

  <script>
    const state = reactive({ name: 'xiaopang', age: 3 })
    const state1 = reactive({ name: 'xxp', age: 2 })


    registEffect(function e1() {
      console.log("e1执行。。。", state.name);
    })

    registEffect(function e2() {
      console.log("e2执行。。。", state1.name);
    })

    setTimeout(() => {
      state.name = 'xiaoming'
    }, 1000)
  </script>
</body>

</html>